﻿@model IEnumerable<ECSE6770.Venue>
@{ ViewBag.Title = "Manage Venues"; }
<p>
    Modules must specify a venue that they are hosted at. This allows administrators to provide details (such as address and
    local accommodations) only once, for many modules.
</p>
<p>
    @Html.ActionLink("Create New Venue", "New")
</p>
<table>
    <thead>
        <tr>
            <th>
                Name
            </th>
            <th>
                Address
            </th>
            <th>
                Country
            </th>
            <th>
                Accommodations
            </th>
            <th style="width: 80px;">
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Address)<br />
                    @Html.DisplayFor(modelItem => item.City), @Html.DisplayFor(modelItem => item.State)
                    @Html.DisplayFor(modelItem => item.ZipCode)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Country)
                </td>
                <td class="markup">
                    @Html.Raw(item.LocalAccommodations)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
                    @Html.ActionLink("Delete", "ConfirmDelete", new { id = item.Id })
                </td>
            </tr>
        }
    </tbody>
</table>
